<?php
	$cart = __template_get('cart');
	//echo "<pre>".print_r($cart,true)."</rep>";
	if($cart!="" && $cart['count']>0){ ?>
	<ul>
		<? foreach($cart['list'] as $id=>$productItem){ ?>
		
		<? if(isset($productItem['product'])){
			$product = unserialize($productItem['product']);
			
			//echo "<pre>".print_r($product,true)."</pre>";
		?>
		
		<li id="pid_<?=$product->product_id ?>">
			<?= Html::image(__imageSizer("webapp/public/media/".$product->image,"micro"),
						"",
						Html::db($product->name),
						"fleft") ?>
			<p><?= Html::db($product->name)?></p>
			<p><?= Html::currency($product->price)?> x <?= Html::db($productItem['qty'])?></p>
			<p><?= HtmlHelpers::ajaxDeleteButton(
						"cart",
						"delete",
						"product",
						$product->product_id,
						__s('cart','delButton_title',$product->name),
						array('ajaxTarget'=>"cartlist",
							  'styleclass'=>"fright"))?></p>
			<div class="spacer"></div>					  
		</li>
		<? }?>
<?   	}?>
	</ul>
<?	}else{?>
		<p class="info"><?=__("cart","no_product_in_cart")?></p>
<?	}?>